def call(project, branch){

    def loraBackendTemplate = [
        'label' : 'BACKEND',
        'image' : '192.168.9.38:18082/yidao/jnlp-slave:lora-backend_arm32v7_ubuntu_18.04',
        'gitUrl' : 'ssh://gerrit@192.168.30.243:29418/D200_LORA_CAMERA.git',
        'branch' : branch,
        'buildDir' : 'BackEnd',
        'buildScript' : 'pyinstaller -F WebPage.py',
        'packageDir' : 'BackEnd',
        'packageScript' : 'mkdir web && cp dist/WebPage config.ini user.db web/ && tar cvf web.tar web/',
        'artifactName' : "BackEnd/web.tar",
        'artifactory' : "D200Robot/LoraCamera"
    ]

    def loraFrontendTemplate = [
        'label' : 'FRONTEND',
        'image' : '192.168.9.38:18082/yidao/jnlp-slave:node',
        'gitUrl' : 'ssh://gerrit@192.168.30.243:29418/D200_LORA_CAMERA.git',
        'branch' : branch,
        'buildDir' : 'FrontEnd',
        'buildScript' : 'cnpm install && npm run build',
        'packageDir' : 'FrontEnd',
        'packageScript' : 'tar cvf dist.tar dist/',
        'artifactName' : "FrontEnd/dist.tar",
        'artifactory' : "D200Robot/LoraCamera"
    ]

    def loraGatewayBaseTemplate = [
        'label' : 'GatewayBase',
        'image' : '192.168.9.38:18082/yidao/jnlp-slave:lora-backend_arm32v7_ubuntu_18.04',
        'gitUrl' : 'ssh://gerrit@192.168.30.243:29418/D200_LORA_CAMERA.git',
        'branch' : branch,
        'buildDir' : 'Embed/Lora_Getway_SourceCode/D200_LORA_GATEWAY_BASE',
        'buildScript' : 'pyinstaller -F LoraHttpServer_v1.0.2.py -p lib/ -n LoraHttpServer',
        'packageDir' : 'Embed/Lora_Getway_SourceCode/D200_LORA_GATEWAY_BASE',
        'packageScript' : 'mkdir upgrade && cp -r dist/LoraHttpServer . && tar cvf python.tar upgrade/ LoraHttpServer config/',
        'artifactName' : "Embed/Lora_Getway_SourceCode/D200_LORA_GATEWAY_BASE/python.tar",
        'artifactory' : "D200Robot/LoraCamera"
    ]

    def loraGatewayBaseLTSTemplate = [
        'label' : 'GatewayBaseLTS',
        'image' : '192.168.9.38:18082/yidao/jnlp-slave:lora-backend_arm32v7_ubuntu_18.04',
        'gitUrl' : 'ssh://gerrit@192.168.30.243:29418/D200_LORA_CAMERA.git',
        'branch' : branch,
        'buildDir' : 'LoRa_Camera_LTS/Lora_Getway_SourceCode_LTS/LORA_GATEWAY_LTS_BASE',
        'buildScript' : 'pyinstaller -F LoraHttpServer_LTS.py -p lib/ -n LoraHttpServer',
        'packageDir' : 'LoRa_Camera_LTS/Lora_Getway_SourceCode_LTS/LORA_GATEWAY_LTS_BASE',
        'packageScript' : 'mkdir upgrade && cp -r dist/LoraHttpServer . && tar cvf python.tar upgrade/ LoraHttpServer config/',
        'artifactName' : "LoRa_Camera_LTS/Lora_Getway_SourceCode_LTS/LORA_GATEWAY_LTS_BASE/python.tar",
        'artifactory' : "D200Robot/LoraCamera"
    ]

    def loraGatewayBspTemplate = [
        'label' : 'GatewayBsp',
        'image' : '192.168.9.38:18082/yidao/jnlp-slave:lora-backend_x86_64_ubuntu_18.04',
        'gitUrl' : 'ssh://gerrit@192.168.30.243:29418/D200_LORA_CAMERA.git',
        'branch' : branch,
        'buildDir' : 'Embed/Lora_Getway_SourceCode/D200_LORA_GATEWAY_BSP/D200_LORA_GATEWAY',
        'buildScript' : 'make',
        'packageDir' : '',
        'packageScript' : '',
        'artifactName' : "Embed/Lora_Getway_SourceCode/D200_LORA_GATEWAY_BSP/D200_LORA_GATEWAY/app_lora",
        'artifactory' : "D200Robot/LoraCamera"
    ]

    def loraGatewayBspLTSTemplate = [
        'label' : 'GatewayBspLTS',
        'image' : '192.168.9.38:18082/yidao/jnlp-slave:lora-backend_x86_64_ubuntu_18.04',
        'gitUrl' : 'ssh://gerrit@192.168.30.243:29418/D200_LORA_CAMERA.git',
        'branch' : branch,
        'buildDir' : 'LoRa_Camera_LTS/Lora_Getway_SourceCode_LTS/LORA_GATEWAY_LTS_BSP',
        'buildScript' : 'make',
        'packageDir' : '',
        'packageScript' : '',
        'artifactName' : "LoRa_Camera_LTS/Lora_Getway_SourceCode_LTS/LORA_GATEWAY_LTS_BSP/app_lora",
        'artifactory' : "D200Robot/LoraCamera"
    ]

    def buildTemplate = [
        'LoraBackend' : loraBackendTemplate,
        'LoraFrontend' : loraFrontendTemplate,
        'LoraGatewayBase' : loraGatewayBaseTemplate,
        'LoraGatewayBaseLTS' : loraGatewayBaseLTSTemplate,
        'LoraGatewayBsp' : loraGatewayBspTemplate,
        'LoraGatewayBspLTS' : loraGatewayBspLTSTemplate
    ]

    return buildTemplate.get(project)

}